# coding:UTF-8
# ________________________
# Project_Name:pyzidonghua
# File_Name:Administrator
# Author:Administrator
# Date_Time:2022/4/26 18:53
# Description:
# ________________________
import unittest  # 导入测试框架

from selenium import webdriver
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait  # 导入显式等待类
from selenium.webdriver.support import expected_conditions  # 导入等待条件
from selenium.webdriver.common.action_chains import ActionChains

from po_roject.page.index_page_recruit import IndexPage


class Index001(unittest.TestCase):
    def setUp(self) -> None:
        self.driver = webdriver.Chrome()
        self.wait = WebDriverWait(self.driver, 30)
        # 生成首页类对象
        self.index_page = IndexPage(self.driver, self.wait)
        self.driver.get('http://localhost/cloud/#/open/login')
        self.driver.maximize_window()
        self.index_page.input_user('admin')
        self.index_page.input_pwd('123456')
        self.index_page.input_verif('8888')
        self.index_page.click_login()
        self.index_page.click_recruit()
    #
    # def test1(self):
    #     self.index_page.click_Data_entry()
    #     self.index_page.click_template()
    #     self.index_page.click_Import(r'C:\cloulp\nginx-1.16.0\html\template')
    #     self.index_page.click_add_to()
    #     self.index_page.click_add_name('张三')
    #     self.index_page.click_add_sex()
    #     self.index_page.click_add_priority()
    #     self.index_page.click_add_channel()
    #     self.index_page.click_add_source()
    #     self.index_page.click_add_product()
    #     self.index_page.click_add_phone('18398239084')
    #     self.index_page.click_add_whole1()
    #     self.index_page.click_add_whole2()
    #     self.index_page.click_add_education()



    def test2(self):
        self.index_page.click_resources() #点击资源管理
        self.index_page.click_tradition() #点击传统简历
        self.index_page.click_query() #点击查询
        self.index_page.input_name('张三') #输入姓名
        self.index_page.input_phone('18398239084') #输入电话号码
        self.index_page.click_query_Below() #点击下方查询
        self.index_page.click_choice() #点击单选框
        # self.index_page.click_confirm() #点击修改
        # self.index_page.click_change_name('李四') #点击修改姓名
        # self.index_page.click_change_sex() #点击选择性别
        # self.index_page.click_change_product() #点击选择产品线
        # self.index_page.click_determine() #点击确定







    def tearDown(self) -> None:
        self.driver.quit()
